package cn.buk.tms.entity.misc;

import cn.buk.tms.entity.base.BaseInfo;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;

/**
 * 支付宝商家账户账务明细
 *
 * @author yfdai 2021-10-27
 */
@Entity
@Table(name = "alipay_bill_account_log", uniqueConstraints = @UniqueConstraint(
        name = "uk_alipay_bill_account_log",
        columnNames = {"enterprise_id", "account_log_id"}))
public class AlipayBillAccountLog extends BaseInfo {



    @Column(name = "account_log_id", length = 256)
    private String accountLogId;

    /**
     * 支付宝的主账号, 一般是email
     */
    @Column(name = "main_account")
    private String mainAccount;

    /**
     * 对应的结算单ID
     */
    @Column(name = "receipt_id")
    private int receiptId;

    @Column(name = "alipay_order_no")
    private String alipayOrderNo;

    @Column(name = "balance", length = 20)
    private String balance;

    @Column(name = "bill_source", length = 1000)
    private String billSource;

    @Column(name = "biz_desc", length = 1000)
    private String bizDesc;

    @Column(name = "biz_nos", length = 1000)
    private String bizNos;

    @Column(name = "biz_orig_no", length = 1000)
    private String bizOrigNo;

    @Column(name = "direction", length = 20)
    private String direction;

    @Column(name = "merchant_order_no")
    private String merchantOrderNo;

    @Column(name = "other_account")
    private String otherAccount;

    @Column(name = "trans_amount", length = 20)
    private String transAmount;

    @Column(name = "trans_dt", length = 20)
    private String transDt;

    @Column(name = "trans_memo", length = 1000)
    private String transMemo;

    @Column(name = "type")
    private String type;

    /**
     * 支付宝账务流水号。对账使用，不脱敏
     */
    public String getAccountLogId() {
        return accountLogId;
    }

    public void setAccountLogId(String accountLogId) {
        this.accountLogId = accountLogId;
    }

    /**
     * 支付宝订单号。对账使用，不脱敏
     */
    public String getAlipayOrderNo() {
        return alipayOrderNo;
    }

    public void setAlipayOrderNo(String alipayOrderNo) {
        this.alipayOrderNo = alipayOrderNo;
    }

    /**
     * 余额，仅供参考。由于架构原因，余额变动并不保证连续。也就是余额不一定等于上一笔余额减去当笔金额。但是会保证最终一致。
     */
    public String getBalance() {
        return balance;
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    /**
     * 业务账单来源，资金收支对应的上游业务订单数据来源，确认业务订单出处。此字段供商户对账使用，不脱敏。
     */
    public String getBillSource() {
        return billSource;
    }

    public void setBillSource(String billSource) {
        this.billSource = billSource;
    }

    /**
     * 业务描述，资金收支对应的详细业务场景信息。此字段供商户对账使用，不脱敏。
     */
    public String getBizDesc() {
        return bizDesc;
    }

    public void setBizDesc(String bizDesc) {
        this.bizDesc = bizDesc;
    }

    /**
     * 业务订单号，资金收支相关的业务场景订单号明细，字母大写；M：平台交易主单号，S：平台交易子单号，O：业务系统单据号（如退款订单号）。此字段供商户对账使用，不脱敏。
     */
    public String getBizNos() {
        return bizNos;
    }

    public void setBizNos(String bizNos) {
        this.bizNos = bizNos;
    }

    /**
     * 业务基础订单号，资金收支对应的原始业务订单唯一识别编号。此字段供商户对账使用，不脱敏。
     */
    public String getBizOrigNo() {
        return bizOrigNo;
    }

    public void setBizOrigNo(String bizOrigNo) {
        this.bizOrigNo = bizOrigNo;
    }

    /**
     * 收入/支出。表示收支。amount是正数，返回“收入”。amount是负数，返回“支出”
     */
    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    /**
     * 商户订单号，创建支付宝交易时传入的信息。对账使用，不脱敏
     */
    public String getMerchantOrderNo() {
        return merchantOrderNo;
    }

    public void setMerchantOrderNo(String merchantOrderNo) {
        this.merchantOrderNo = merchantOrderNo;
    }

    /**
     * 对方账户
     */
    public String getOtherAccount() {
        return otherAccount;
    }

    public void setOtherAccount(String otherAccount) {
        this.otherAccount = otherAccount;
    }

    /**
     * 金额
     */
    public String getTransAmount() {
        return transAmount;
    }

    public void setTransAmount(String transAmount) {
        this.transAmount = transAmount;
    }

    /**
     * 入账时间
     */
    public String getTransDt() {
        return transDt;
    }

    public void setTransDt(String transDt) {
        this.transDt = transDt;
    }

    /**
     * 账务备注。由上游业务决定，不可依赖此字段进行对账
     */
    public String getTransMemo() {
        return transMemo;
    }

    public void setTransMemo(String transMemo) {
        this.transMemo = transMemo;
    }

    /**
     * 账务记录的类型，仅供参考
     */
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getReceiptId() {
        return receiptId;
    }

    public void setReceiptId(int receiptId) {
        this.receiptId = receiptId;
    }

    public String getMainAccount() {
        return mainAccount;
    }

    public void setMainAccount(String mainAccount) {
        this.mainAccount = mainAccount;
    }
}
